package top.yxqz.spring.myannotation.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import top.yxqz.spring.myannotation.dao.UserDao;
import top.yxqz.spring.myannotation.service.UserService;

/**
 * @author: 余小小
 * @date: 2023/4/11
 * @description：
 * @Qualifier:指定使用某个bean ，如果和@Autowired使用，就是setter注入了
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    @Qualifier("userDaoImpl2")
    private UserDao userDao;

    @Override
    public void sayHello() {
        userDao.sayHello();
    }


}
